set encoding utf8
set term postscript eps enhanced color
set grid

# Tempos de execução
set xlabel 'Variáveis no sistema linear'
set ylabel 'Tempo (s)'
set xrange [0:4000]
set xtics 500

set output 'img/tempos.eps'
set style histogram
plot 'tempos/warp_based.data' using 1:2:4 title 'Baseado em Warp' with yerrorlines ls 1 lt rgb '#3366CC', \
     'tempos/warp_based2.data' using 1:2:4 title 'Baseado em Warp (2)' with yerrorlines ls 1 lt rgb '#DC3912', \
     'tempos/min_threads.data' using 1:2:4 title 'Min. threads' with yerrorlines ls 1 lt rgb '#109618', \
     'tempos/max_threads.data' using 1:2:4 title 'Máx. threads' with yerrorlines ls 1 lt rgb '#990099', \
     'tempos/opencl.data' using 1:2:4 title 'OpenCL' with yerrorlines ls 1 lt rgb '#FF9900'

set output 'img/tempos_seq1.eps'
plot 'tempos/warp_based.data' using 1:2:4 title 'Baseado em Warp' with yerrorlines ls 1 lt rgb '#3366CC', \
     'tempos/warp_based2.data' using 1:2:4 title 'Baseado em Warp (2)' with yerrorlines ls 1 lt rgb '#DC3912', \
     'tempos/min_threads.data' using 1:2:4 title 'Min. threads' with yerrorlines ls 1 lt rgb '#109618', \
     'tempos/max_threads.data' using 1:2:4 title 'Máx. threads' with yerrorlines ls 1 lt rgb '#990099', \
     'tempos/opencl.data' using 1:2:4 title 'OpenCL' with yerrorlines ls 1 lt rgb '#FF9900', \
     'tempos/seq.data' using 1:2:4 title 'Sequencial' with yerrorlines ls 1 lt rgb 'cyan'

set output 'img/tempos_seq2.eps'
plot 'tempos/warp_based.data' using 1:2:4 title 'Baseado em Warp' with yerrorlines ls 1 lt rgb '#3366CC', \
     'tempos/warp_based2.data' using 1:2:4 title 'Baseado em Warp (2)' with yerrorlines ls 1 lt rgb '#DC3912', \
     'tempos/min_threads.data' using 1:2:4 title 'Min. threads' with yerrorlines ls 1 lt rgb '#109618', \
     'tempos/max_threads.data' using 1:2:4 title 'Máx. threads' with yerrorlines ls 1 lt rgb '#990099', \
     'tempos/opencl.data' using 1:2:4 title 'OpenCL' with yerrorlines ls 1 lt rgb '#FF9900', \
     'tempos/seq_optimized.data' using 1:2:4 title 'Sequencial otimizado' with yerrorlines ls 1 lt rgb 'cyan'

set ylabel 'Speedup'

set output 'img/speedup1.eps'
plot 'tempos/warp_based.data' using 1:5 title 'Baseado em Warp' with lines ls 1 lt rgb '#3366CC', \
     'tempos/warp_based2.data' using 1:5 title 'Baseado em Warp (2)' with lines ls 1 lt rgb '#DC3912', \
     'tempos/min_threads.data' using 1:5 title 'Min. threads' with lines ls 1 lt rgb '#109618', \
     'tempos/max_threads.data' using 1:5 title 'Máx. threads' with lines ls 1 lt rgb '#990099', \
     'tempos/opencl.data' using 1:5 title 'OpenCL' with lines ls 1 lt rgb '#FF9900'

set output 'img/speedup2.eps'
plot 'tempos/warp_based.data' using 1:6 title 'Baseado em Warp' with lines ls 1 lt rgb '#3366CC', \
     'tempos/warp_based2.data' using 1:6 title 'Baseado em Warp (2)' with lines ls 1 lt rgb '#DC3912', \
     'tempos/min_threads.data' using 1:6 title 'Min. threads' with lines ls 1 lt rgb '#109618', \
     'tempos/max_threads.data' using 1:6 title 'Máx. threads' with lines ls 1 lt rgb '#990099', \
     'tempos/opencl.data' using 1:6 title 'OpenCL' with lines ls 1 lt rgb '#FF9900'
